  var maxProfit = function(price){
    if(price.length<=1){
      return 0 
    }
    let result = []
    for(let i = 0;i<prices.length;j++){
      if(prices[j]-prices[i]<0){
        result.push(0)
      }
      else{
        result.push(proces[j]-prices[i])
      }
    }
      return.sort()
  return result[result.length-1]
  }


class Solution {
    public int singleNumber(int[] nums) {
        Arrays.sort(nums);
        for(int i=0;i<nums.length-2;i++){
            if(nums[i]==nums[i+2]){
                i+=2;
            }else{
                if(nums[i]==nums[i+1])
                    return nums[i+2];
                else
                    return nums[i];
            }
        }
        return nums[nums.length-1];
    }
}